package com.example.a22310.myapplication.Activity;

import android.content.SharedPreferences;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.a22310.myapplication.ViewModel.Post.PostViewModel;
import com.example.a22310.myapplication.databinding.ActivityUserPostBinding;


public class UserPost extends AppCompatActivity {
    private ActivityUserPostBinding binding;
    private int userid;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_user_post);
        SharedPreferences sharedPreferences = getSharedPreferences("yuejian'data", this.MODE_PRIVATE);
        userid = sharedPreferences.getInt("userId",2);
        new PostViewModel(this,userid,binding);
    }
}
